package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TSendReceiveInfoMapper;
import com.ruoyi.system.domain.TSendReceiveInfo;
import com.ruoyi.system.service.ITSendReceiveInfoService;

/**
 * 发收信息Service业务层处理
 * 
 * @author wzy
 * @date 2024-08-30 10:43:11
 */
@Service
public class TSendReceiveInfoServiceImpl implements ITSendReceiveInfoService 
{
    @Autowired
    private TSendReceiveInfoMapper tSendReceiveInfoMapper;

    /**
     * 查询发收信息
     * 
     * @param sendReceiveId 发收信息主键
     * @return 发收信息
     */
    @Override
    public TSendReceiveInfo selectTSendReceiveInfoBySendReceiveId(Long sendReceiveId)
    {
        return tSendReceiveInfoMapper.selectTSendReceiveInfoBySendReceiveId(sendReceiveId);
    }

    /**
     * 查询发收信息列表
     * 
     * @param tSendReceiveInfo 发收信息
     * @return 发收信息
     */
    @Override
    public List<TSendReceiveInfo> selectTSendReceiveInfoList(TSendReceiveInfo tSendReceiveInfo)
    {
        return tSendReceiveInfoMapper.selectTSendReceiveInfoList(tSendReceiveInfo);
    }

    /**
     * 新增发收信息
     * 
     * @param tSendReceiveInfo 发收信息
     * @return 结果
     */
    @Override
    public int insertTSendReceiveInfo(TSendReceiveInfo tSendReceiveInfo)
    {
        tSendReceiveInfo.setCreateTime(DateUtils.getNowDate());
        return tSendReceiveInfoMapper.insertTSendReceiveInfo(tSendReceiveInfo);
    }

    /**
     * 修改发收信息
     * 
     * @param tSendReceiveInfo 发收信息
     * @return 结果
     */
    @Override
    public int updateTSendReceiveInfo(TSendReceiveInfo tSendReceiveInfo)
    {
        tSendReceiveInfo.setUpdateTime(DateUtils.getNowDate());
        return tSendReceiveInfoMapper.updateTSendReceiveInfo(tSendReceiveInfo);
    }

    /**
     * 批量删除发收信息
     * 
     * @param sendReceiveIds 需要删除的发收信息主键
     * @return 结果
     */
    @Override
    public int deleteTSendReceiveInfoBySendReceiveIds(Long[] sendReceiveIds)
    {
        return tSendReceiveInfoMapper.deleteTSendReceiveInfoBySendReceiveIds(sendReceiveIds);
    }

    /**
     * 删除发收信息信息
     * 
     * @param sendReceiveId 发收信息主键
     * @return 结果
     */
    @Override
    public int deleteTSendReceiveInfoBySendReceiveId(Long sendReceiveId)
    {
        return tSendReceiveInfoMapper.deleteTSendReceiveInfoBySendReceiveId(sendReceiveId);
    }

    /**
     * 查询发收信息列表，By Mobile
     *
     * @param mobile 发收信息
     * @return 发收信息
     */
    @Override
    public TSendReceiveInfo selectTSendReceiveInfoByMobile(String mobile)
    {
        return tSendReceiveInfoMapper.selectTSendReceiveInfoByMobile(mobile);
    }
}
